function v = covtrace(mdl)
%COVTRACE Gets the trace of the covariance matrix
%
% [ Syntax ]
%   - v = covtrace(Op)
%
% [ History ]
%   - Created by Dahua Lin, on Dec 21, 2007
%

if ~isempty(mdl.trsm)
    v = mdl.trsm;
else
    v = sum(mdl.sigma);
end
